/****************************************************************************
**
** DCOP Skeleton created by dcopidl2cpp from simclockinterface.kidl
**
** WARNING! All changes made in this file will be lost!
**
*****************************************************************************/

#include "./simclockinterface.h"

#include <kdatastream.h>


static const char* const SimClockInterface_ftable[5][3] = {
    { "ASYNC", "stop()", "stop()" },
    { "ASYNC", "start()", "start()" },
    { "ASYNC", "setUTC(QDateTime)", "setUTC(QDateTime newtime)" },
    { "ASYNC", "setScale(float)", "setScale(float s)" },
    { 0, 0, 0 }
};

bool SimClockInterface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
{
    if ( fun == SimClockInterface_ftable[0][1] ) { // void stop()
	replyType = SimClockInterface_ftable[0][0]; 
	stop( );
    } else if ( fun == SimClockInterface_ftable[1][1] ) { // void start()
	replyType = SimClockInterface_ftable[1][0]; 
	start( );
    } else if ( fun == SimClockInterface_ftable[2][1] ) { // void setUTC(QDateTime)
	QDateTime arg0;
	QDataStream arg( data, IO_ReadOnly );
	arg >> arg0;
	replyType = SimClockInterface_ftable[2][0]; 
	setUTC(arg0 );
    } else if ( fun == SimClockInterface_ftable[3][1] ) { // void setScale(float)
	float arg0;
	QDataStream arg( data, IO_ReadOnly );
	arg >> arg0;
	replyType = SimClockInterface_ftable[3][0]; 
	setScale(arg0 );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return TRUE;
}

QCStringList SimClockInterface::interfaces()
{
    QCStringList ifaces = DCOPObject::interfaces();
    ifaces += "SimClockInterface";
    return ifaces;
}

QCStringList SimClockInterface::functions()
{
    QCStringList funcs = DCOPObject::functions();
    for ( int i = 0; SimClockInterface_ftable[i][2]; i++ ) {
	QCString func = SimClockInterface_ftable[i][0];
	func += ' ';
	func += SimClockInterface_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


